<?php 
	defined('_JEXEC') or die('Restricted access');	
?>
 <link rel="stylesheet" type="text/css" media="screen" href="<?php echo $this->template_dir;?>css/styles.css" />
 <link rel="stylesheet" type="text/css" media="screen" href="<?php echo $this->template_dir;?>css/thickbox.css" />
<script src="<?php echo $this->template_dir ;?>js/validate/jquery.validate.js" type="text/javascript"></script>
<style type="text/css">
			form { padding: 10px; margin: 0; display: block;}
			label { display:block; float: left; width: 70px; clear: left; margin-top: 7px;}
			input, textarea { float: left; width: 400px; margin-top: 7px; border: 1px solid #656565; font-size: 12px; padding: 4px 4px 2px 4px; font-family: Helvetica, Arial, sans-serif;}
			input {height: 18px; line-height: 18px;}
			input.button { width: 70px; margin-right: 8px; background: #000; color: #fff; font-size: 12px; height: 25px; line-height: 18px; padding: 2px 4px 4px 4px; cursor: pointer;}
			input#send { margin-left: 70px; clear:left;}
        </style>
       
        
<form name="kontaktForm" id="kontaktForm" action="<?php echo $this->action ?>" method="post">
        	<fieldset>
            	<label>Til:</label><input type="text" class="input-text" value="" id="email" name="email" onchange="assign_to_name(this.value);" />
                <label>Subject:</label><input type="text" class="input-text" value="Nyheder fra Alsace" id="subject" name="subject" />                
                <label style="padding-top:7px;">Besked: </label>                  	           
                <textarea cols="10" rows="7" id="message" name="message">
Hej, 

Hvis du også vil læse om nyheder fra Alsace, så klik ind på www.alsacenyhed.dk
                </textarea>
				<?php				
//				require_once('components/com_kontakt/fckeditor/fckeditor.php');
//$FCKeditor = new FCKeditor('message');
//$FCKeditor->BasePath = 'components/com_kontakt/fckeditor/';
//$FCKeditor->Value = 'Hej,<br/>Hvis du også vil læse om nyheder fra Alsace, så klik ind på siden <a href="'.JURI::root().'" target="_blank"><u>her</u></a>';
//$FCKeditor->Width = '412px';
//$FCKeditor->Height = 130;
//$FCKeditor->Create(); 
				?>                
                <input class="button" id="send" type="submit" value="Send" name="Abonner" id="aca_22"/>
				<input class="button" id="cancel" type="reset" value="Nulstil" />
            </fieldset>
            <input type="hidden" name="option" value="com_kontakt" />
			<input type="hidden" name="controller" value="" />
			<input type="hidden" name="task" id="task" value="submit" />
			
			<!-- begin to add for acajoom -->
			<input type="hidden" name="receive_html" value="1" id="wz_2">
			<input type="hidden" name="confirmed" value="1" id="confirmed">
			<input type="hidden" name="language_iso" value="eng" id="language_iso">
			<input type="hidden" name="name" value="" id="name">
			<!-- end to add for acajoom -->
			<?php echo JHTML::_( 'form.token' ); ?>
        </form>
                
<script language="javascript">
	function assign_to_name(email){
		var frm = document.kontaktForm;
		frm.name.value = email;
	}
	
	jQuery(document).ready(function($) {
		//jQuery.updnWatermark.attachAll();
			
		jQuery("#kontaktForm").validate({									
			errorPlacement: function(error, element) {			
			},
			invalidHandler: function(form, validator) {
			  var errors = validator.numberOfInvalids();
			  if (errors) {
				alert(validator['errorList'][0]['message']);
				validator['errorList'][0]['element'].focus();
			  } else {
			  }
			},

			rules: {				
				subject: "required",
				message: "required",
				email: {
					required: true,
					email: true
				}
			},
			messages: {				
				subject: "<?php echo JText::_( 'Indtast emne' ); ?>",
				message: "<?php echo JText::_( 'Indtast besked' ); ?>",
				email: "<?php echo JText::_( 'Angiv en gyldig e-mail adresse' ); ?>"
			}
		});
	});
</script>
